package com.xnyzc.lhy.mis.controller.cmsapi.config;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.entity.system.OaSysGlobalConfig;
import com.xnyzc.lhy.mis.service.cms.config.ICmsGlobalConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description 系统配置
 * @Author conglijuan
 * @Date 2019/8/2 16:31
 **/
@RestController
@RequestMapping(value = "cms/global")
public class CmsGlobalConfigController {

    @Autowired
    private ICmsGlobalConfigService iCmsGlobalConfigService;

    /**
     * 获取系统配置信息
     * @return
     */
    @GetMapping(value = "getCmsGlobalConfigDetail")
    public Rv getCmsGlobalConfigDetail(){
        return iCmsGlobalConfigService.getCmsGlobalConfigDetail();
    }

    /**
     * 更新系统配置信息
     * @return
     */
    @PostMapping(value = "updateCmsGlobalConfig")
     public Rv updateCmsGlobalConfig(@RequestBody OaSysGlobalConfig oaSysGlobalConfig){
            return iCmsGlobalConfigService.updateCmsGlobalConfig(oaSysGlobalConfig);
    }
}
